package ts.test.service.impl;

import com.ktjy.pojo.News;
import ts.test.dao.NewsDao;
import ts.test.service.NewsService;

public class NewsServiceImpl implements NewsService {
    private NewsDao dao;
    @Override
    public void save(News news){
        //调用NewsDao的方法保存新闻信息
        dao.save(news);
    }

    public  void setDao(NewsDao dao) {
        this.dao = dao;
    }

    public void addNews(News news) {
        //调用NewsDao的方法保存新闻信息
        dao.save(news);
    }
}
